package com.yootoo.extpmml.Exception;

import java.sql.SQLException;

public class ModelExecuteException extends RuntimeException {

    private SQLException e;

    public ModelExecuteException(String msg) {
        this(msg, null);
    }

    public ModelExecuteException(String msg, SQLException e) {
        super(msg, e);
        this.e = e;
    }

    public ModelExecuteException(String msg, Throwable cause) {
        super(msg, cause);
    }

    public int getErrorCode() {
        if (e != null)
            return e.getErrorCode();
        else
            return -1;
    }
}